PostgreSQL
PostgreSQL class provides mechanisms to interact with a PostgreSQL database. It implements Driver
, Driver.Pool
, and Driver.Transactional
interfaces, offering functionalities such as connection pooling, executing queries, fetching data, and handling transactions.
The URL scheme designator can be either postgresql://
or postgres://
. Each of the URL parts is optional.
postgresql:// postgresql://localhost postgresql://localhost:5433 postgresql://localhost/mydb
Parameters
The URL of the PostgreSQL database to connect to.
The username used for authentication.
The password used for authentication.
Optional pool configuration, defaulting to Driver.Pool.Options
.
Constructors
Types
Represents a database transaction, providing methods to perform commit, rollback, and query execution operations within the transaction's context.
Functions
Listens to a specific PostgreSQL channel and processes notifications using the provided callback function.
Listens to notifications on the specified PostgreSQL channels and processes them using the provided callback function. The notifications are received via the PostgreSQL listen/notify mechanism.
Validates the name of a PostgreSQL channel to ensure it adheres to the naming rules.